#ifndef Test_queue_h
#define Test_queue_h

typedef struct Queue {
    int length;                   // the number of QueueItems in the Queue 
    struct Queue_item* head;      // the pointer to the oldest QueueItem in the Queue
    struct Queue_item* tail;      // the pointer to the newest QueueItem in the Queue
} queue;

typedef struct Queue_item {
    int id;
    void* payload;                // the pointer to the actual content of the QueueItem
    struct Queue_item* previous;  // the pointer to the previous QueueItem in the Queue  
    struct Queue_item* next;      // the pointer to the next QueueItem in the Queue
} queue_item;


void enqueue(queue* queue, queue_item* item);
int dequeue(queue* queue);
void delete(queue* queue, queue_item* item);

#endif
